/*
 * Copyright 2010 - Jeremie Brebec
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.jb.coinche.client.business.model;

import java.util.HashMap;

import org.jb.statemachine.client.AbstractState;

public class CoincheAuction extends AbstractState implements GameState {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1355443692758472606L;

	private String coincheUser;
	private Auction auction;
	private Game game;
	private HashMap< Player, Auction > mapAuctions = new HashMap< Player, Auction >();

	/**
	 * @param coincheUser the coincheUser to set
	 */
	public void setCoincheUser(String coincheUser) {
		this.coincheUser = coincheUser;
	}
	/**
	 * @return the coincheUser
	 */
	public String getCoincheUser() {
		return coincheUser;
	}
	/**
	 * @param auction the auction to set
	 */
	public void setAuction(Auction auction) {
		this.auction = auction;
	}
	/**
	 * @return the auction
	 */
	public Auction getAuction() {
		return auction;
	}
	/**
	 * @param game the game to set
	 */
	public void setGame(Game game) {
		this.game = game;
	}
	/**
	 * @return the game
	 */
	public Game getGame() {
		return game;
	}
	
	/**
	 * 
	 * @param p
	 * @return
	 */
	public Auction getPlayerAuction( Player p ) {
		return mapAuctions.get(p);
	}
	
	/**
	 * 
	 * @param p
	 * @param auction
	 */
	public void setPlayerAuction( Player p, Auction auction ) {
		mapAuctions.put(p, auction);
	}
}
